﻿using SoftFloat;
using System.Diagnostics.CodeAnalysis;

namespace BepuUtilities
{
    public unsafe class Avx
    {
        public static bool IsSupported { get => false; }

        public unsafe static Vector256<sfloat> LoadVector256(sfloat* address)
        {
            return Avx.LoadVector256(address);
        }

        public unsafe static Vector256<sfloat> LoadAlignedVector256(sfloat* address)
        {
            return Avx.LoadAlignedVector256(address);
        }

        public static Vector256<sfloat> Permute2x128(Vector256<sfloat> left, Vector256<sfloat> right, [ConstantExpected] byte control)
        {
            return Avx.Permute2x128(left, right, control);
        }

        public static Vector256<sfloat> Shuffle(Vector256<sfloat> value, Vector256<sfloat> right, [ConstantExpected] byte control)
        {
            return Avx.Shuffle(value, right, control);
        }

        public unsafe static void StoreAligned(sfloat* address, Vector256<sfloat> source)
        {
            Avx.StoreAligned(address, source);
        }

        public static Vector256<sfloat> UnpackHigh(Vector256<sfloat> left, Vector256<sfloat> right)
        {
            return Avx.UnpackHigh(left, right);
        }

        public static Vector256<sfloat> UnpackLow(Vector256<sfloat> left, Vector256<sfloat> right)
        {
            return Avx.UnpackLow(left, right);
        }

        public static Vector256<sfloat> CompareEqual(Vector256<sfloat> left, Vector256<sfloat> right)
        {
            return Avx.CompareEqual(left, right);
        }

        public static int MoveMask(Vector256<sfloat> value)
        {
            return Avx.MoveMask(value);
        }

        public static Vector128<sfloat> PermuteVar(Vector128<sfloat> left, Vector128<int> control)
        {
            return Avx.PermuteVar(left, control);
        }
    }
}
